package com.llj.Road_curve_measuring_system.module.History;

import com.llj.Road_curve_measuring_system.base.BasePresenter;
import com.llj.Road_curve_measuring_system.bean.ScreenResult;

import org.litepal.LitePal;
import org.litepal.crud.LitePalSupport;

import java.util.List;

/**
 * @author ：Dyj
 * @date ：Created in 2022/4/24 21:49
 * @description：History的presenter层
 * @modified By：
 * @version: 1.0
 */
public class HistoryPresenter extends BasePresenter<HistoryView> {
    /**
     * 构造方法的同时绑定View接口
     *
     * @param baseView 传入的BaseView的子类
     */
    public HistoryPresenter(HistoryView baseView) {
        super(baseView);
    }

    public void getResultList(){
        List<ScreenResult> allList = LitePal.findAll(ScreenResult.class);
        baseView.setResultData(allList);
    }

    public void visitHistory(int path){
        baseView.doSuccess(path);
    }
}
